#ifndef CLIENT_H
#define CLIENT_H

#include <QObject>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

class Client : public QObject
{
    Q_OBJECT
public:
    explicit Client(QObject *parent = nullptr);
    ~Client();

    static Client *get()
    {
        static Client g;
        return &g;
    }

    int sockfd = -1;

    void init();
    std::string ip = "169.254.252.101";
    int sendMsg(void *msg, int );
signals:
    void sigClose(bool);
    void sigCar(QString id, QString time);
};

#endif // CLIENT_H
